<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>学生毕业设计管理系统</title>
    <link href="css/main_css.css" rel="stylesheet" type="text/css"/>
    <link href="css/zTreeStyle.css" rel="stylesheet" type="text/css">
    <link href="common/layui/layui-v2.5.5/layui/css/layui.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="common/jquery/jquery-3.4.1.js"></script>
    <script type="text/javascript" src="js/commonAll.js"></script>
    <script type="text/javascript" src="common/layui/layui-v2.5.5/layui/layui.all.js"></script>
    <script type="text/javascript">
        /**退出系统**/
        function logout() {
            if (confirm("您确定要退出本系统吗？")) {
                window.location.href = "Login";
            }
        }

        /**获得当前日期**/
        function getDate01() {
            var time = new Date();
            var myYear = time.getFullYear();
            var myMonth = time.getMonth() + 1;
            var myDay = time.getDate();
            if (myMonth < 10) {
                myMonth = "0" + myMonth;
            }
            document.getElementById("yue_fen").innerHTML = myYear + "." + myMonth;
            document.getElementById("day_day").innerHTML = myYear + "." + myMonth + "." + myDay;
        }

    </script>

</head>
<body onload="getDate01()">
<div id="top">

    <div id="top_links">
        <div id="top_op">
            <ul>
                <li>
                    <img alt="当前用户" src="images/common/user.jpg">：
                    <span>admin</span>
                </li>
                <li>
                    <img alt="事务月份" src="images/common/month.jpg">：
                    <span id="yue_fen"></span>
                </li>
                <li>
                    <img alt="今天是" src="images/common/date.jpg">：
                    <span id="day_day"></span>
                </li>
            </ul>
        </div>
        <div id="top_close">
            <!--  <a onclick="logout();" target="_parent">-->
            <a href="logout" target="_parent">
                <img alt="退出系统" title="退出系统" src="images/common/close.jpg"
                     style="position: relative; top: 10px; left: 25px;">
            </a>
        </div>
    </div>
</div>
<!-- side menu start -->
<div id="side">
    <div id="left_menu">
        <ul id="TabPage2" style="height:200px; margin-top:50px;">
            <li id="left_tab1" class="selected" onClick="javascript:switchTab('TabPage2','left_tab1');" title="业务模块">
                <img alt="课题审查" title="课题审查" src="images/common/1_hover.jpg" width="33" height="31">
            </li>
            <li id="left_tab2" onClick="javascript:switchTab('TabPage2','left_tab2');" title="系统管理">
                <img alt="系统管理" title="系统管理" src="images/common/2.jpg" width="33" height="31">
            </li>
            <li id="left_tab3" onClick="javascript:switchTab('TabPage2','left_tab3');" title="其他">
                <img alt="其他" title="其他" src="images/common/3.jpg" width="33" height="31">
            </li>
        </ul>


        <div id="nav_show" style="position:absolute; bottom:0px; padding:10px;">
            <a href="javascript:;" id="show_hide_btn">
                <img alt="显示/隐藏" title="显示/隐藏" src="images/common/nav_hide.png" width="35" height="35">
            </a>
        </div>
    </div>
    <div id="left_menu_cnt">
        <div id="tree" style="margin-top: 40px"></div>
        <div id="tree2" style="margin-top: 40px"></div>
        <script type="text/javascript">
            layui.use('tree', function () {
                var tree = layui.tree;

                //渲染
                var left_menu = tree.render({
                    elem: '#tree',
                    data: [{
                        title: '毕设论文课题审查',
                        spread: true,
                        children: [{
                            id: 'uncheck',
                            title: '待审查课题'
                        }, {
                            id: 'pass',
                            title: '已通过课题'
                        }, {
                            id: 'refuse',
                            title: '未通过课题'
                        }]
                    }],
                    click: function (obj) {
                        var data = obj.data;  //获取当前点击的节点数据
                        $.ajax({
                            url: "Admin/"+data["id"],
                            type: "get",
                            success: function(data) {
                               $("#main").html(data)
                            }
                        });
                    }
                });
            })
            layui.use('tree', function () {
                var tree = layui.tree;

                //渲染
                var left_menu = tree.render({
                    elem: '#tree2',
                    data: [{
                        title: '账号管理',
                        spread: true,
                        children: [{
                            id: 'tearegist',
                            title: '教师账号注册'
                        },
                            {
                                id: 'sturegist',
                                title: '学生账号注册'
                            }]
                    }],
                    click: function (obj) {
                        var data = obj.data;  //获取当前点击的节点数据
                        $.ajax({
                            url: "Admin/"+data["id"],
                            type: "get",
                            success: function(data) {
                                $("#main").html(data)
                            }
                        });
                    }
                });
            })

        </script>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#TabPage2 li').click(function () {
            var index = $(this).index();
            $(this).find('img').attr('src', 'images/common/' + (index + 1) + '_hover.jpg');
            $(this).css({background: '#fff'});
            $('#nav_module').find('img').attr('src', 'images/common/module_' + (index + 1) + '.png');
            $('#TabPage2 li').each(function (i, ele) {
                if (i != index) {
                    $(ele).find('img').attr('src', 'images/common/' + (i + 1) + '.jpg');
                    $(ele).css({background: '#044599'});
                }
            });
            // 显示侧边栏
            switchSysBar(true);
        });

        // 显示隐藏侧边栏
        $("#show_hide_btn").click(function () {
            switchSysBar();
        });
    });

    /**隐藏或者显示侧边栏**/
    function switchSysBar(flag) {
        var side = $('#side');
        var left_menu_cnt = $('#left_menu_cnt');
        if (flag == true) {	// flag==true
            left_menu_cnt.show(500, 'linear');
            side.css({width: '280px'});
            $('#top_nav').css({width: '77%', left: '304px'});
            $('#main').css({left: '280px'});
        } else {
            if (left_menu_cnt.is(":visible")) {
                left_menu_cnt.hide(10, 'linear');
                side.css({width: '60px'});
                $('#top_nav').css({width: '100%', left: '60px', 'padding-left': '28px'});
                $('#main').css({left: '60px'});
                $("#show_hide_btn").find('img').attr('src', 'images/common/nav_show.png');
            } else {
                left_menu_cnt.show(500, 'linear');
                side.css({width: '280px'});
                $('#top_nav').css({width: '77%', left: '304px', 'padding-left': '0px'});
                $('#main').css({left: '280px'});
                $("#show_hide_btn").find('img').attr('src', 'images/common/nav_hide.png');
            }
        }
    }
</script>
<!-- side menu start -->

<div id="main">

</div>
<div style="display:none">
    <script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script>
</div>
</body>
</html>
   
 